import java.util.Scanner;

// HJ11 数字颠倒
public class HJ11 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            Long num = sc.nextLong();
            String str = String.valueOf(num);
            String str2 = new StringBuilder(str).reverse().toString();
            System.out.println(str2);
        }
    }
}
